using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Zwms.Data.Base;
using System.Runtime.Serialization;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class SysDict : BusinessBase<string>
    {
        #region Declarations

        private string _dictKind = String.Empty;
        private string _dictKey = String.Empty;
        private string _dictName = String.Empty;
        private string _dictInfo = String.Empty;
        private string _remark = String.Empty;



        #endregion

        #region Constructors

        public SysDict() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_dictKind);
            sb.Append(_dictKey);
            sb.Append(_dictName);
            sb.Append(_dictInfo);
            sb.Append(_remark);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        public override string Id
        {
            get
            {
                System.Text.StringBuilder uniqueId = new System.Text.StringBuilder();
                uniqueId.Append(_dictKind.ToString());
                uniqueId.Append("^");
                uniqueId.Append(_dictKey.ToString());
                return uniqueId.ToString();
            }
        }

        [DataMember]
        public virtual string DictKind
        {
            get { return _dictKind.TrimEnd(); }
            set
            {
                _dictKind = value;
            }
        }

        [DataMember]
        public virtual string DictKey
        {
            get { return _dictKey.TrimEnd(); }
            set
            {
                _dictKey = value;
            }
        }

        [DataMember]
        public virtual string DictName
        {
            get { return _dictName.TrimEnd(); }
            set
            {
                _dictName = value;
            }
        }

        [DataMember]
        public virtual string DictInfo
        {
            get { return _dictInfo.TrimEnd(); }
            set
            {
                _dictInfo = value;
            }
        }

        [DataMember]
        public virtual string Remark
        {
            get { return _remark.TrimEnd(); }
            set
            {
                _remark = value;
            }
        }

        #endregion
	}
}